//
// Created by 王乐 on 2022/2/17.
//

#include "LePostProcessingGameObject.h"

#include "LePostProcessingRenderer.h"
#include "LePostProcessingBloomRenderer.h"
#include "LePostProcessingDOFRenderer.h"

LePostProcessingGameObject::LePostProcessingGameObject()
{}

LePostProcessingGameObject::~LePostProcessingGameObject()
{

}

void LePostProcessingGameObject::Initialize()
{
    strName = "MyPostProcessing";
    m_bSelectable = true;

    // Transform
    // ---------
    m_Transform.setPosition(-1.0f, 0.0f, 0.0f);

    // Behaviour
    // ---------

    // Renderer
    // ----------------------------------
    // HDR TEST
    LePostProcessingRenderer* pRenderer = new LePostProcessingRenderer();
    pRenderer->initRenderer(this, "/Users/wangle/CLionProjects/Leste/res/shader/postprocessing.vs",
                            "/Users/wangle/CLionProjects/Leste/res/shader/postprocessing.fs");

    // BLOOM TEST
    LePostProcessingBloomRenderer* pBloomRenderer = new LePostProcessingBloomRenderer();
    pBloomRenderer->initRenderer(this, "/Users/wangle/CLionProjects/Leste/res/shader/bloom.vs",
                            "/Users/wangle/CLionProjects/Leste/res/shader/bloom.fs");

    // DOF TEST
    LePostProcessingDOFRenderer* pDOFRenderer = new LePostProcessingDOFRenderer();
    pDOFRenderer->initRenderer(this, "/Users/wangle/CLionProjects/Leste/res/shader/dof.vs",
                                 "/Users/wangle/CLionProjects/Leste/res/shader/dof.fs");

    // Initialize Components
    initComponents(pBloomRenderer, nullptr, nullptr, nullptr);
}
